/**
 * Created by AllanXu on 01/03/2016.
 */
define(function (require) {
	var Vue = require('vue'),
        Config = require('config'),
		_ = require('ajax'),
		utilities = require('utilities');

	var app = new Vue({
		el: '#uc_myInner',
		data: {
			str: ''
		},
		methods:{
			submit: function () {
                _(Config.SERVICE.USERCENTER.MY_INNER_SAVE, {
					id: sessionStorage.id,
					'xgmember.monologue': app.str
				}, function(data) {
					if(data.code == 200 && data.type === 'SUCCESS'){
						alert('保存成功！');
						utilities.refreshUserInfo(function (data) {
							history.back();
						});
					}
                });
			},
			init: function(){
				app.str = utilities.getParameterByName('str');
			}
		}
	});

	app.init();
});
